package day05;
import java.util.Arrays;
import java.util.Scanner;
public class Arraydemo {
    public static void main(String[] args) {
        int[] arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);

        }
        Arrays.sort(arr);
        System.out.println("排序后：");
        for (int i=arr.length-1;i>1;i--){
            System.out.println(arr[i]);
        }























       /* int[] a= new int[6];
        double[] b=new double[7];
        boolean[] c=new boolean[8];
        int[] d= new int[9];
        boolean[] f= new boolean[9];
        boolean[] h =new boolean[9];
        double[] j = new double[4];
        int[] y =new int[]{2,6,7,9};
        double[] l= new double[]{2.3,4.5,6.7,8.9};
        int[] u=  {7,8,9,10};
        int[] o;
        o=new int[]{2,4,5,6};*/


        /*int[] tarr= new int[4];
        System.out.println("数组的长度="+tarr.length);
        tarr[0]=250;
        tarr[1]=380;
        tarr[2]=490;
        tarr[3]=570;
        //tarr[5]=690;//运行时会发生数组下表越界异常
        System.out.println(tarr[2]);
        System.out.println(tarr[tarr.length-3]);*/
       /* int[] arr = new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);
        }*/

        }

    }

